@include('admin::layouts.header')
<div class="admin-main layui-anim layui-anim-upbit">
	<fieldset class="layui-elem-field layui-field-title">
		<legend>添加</legend>
	</fieldset>
	<form class="layui-form layui-form-pane" lay-filter="form">
		<div class="layui-form-item">
			<label class="layui-form-label">所属栏目</label>
			<div class="layui-input-4">
				<select name="blog_column_id" lay-verify="required">
					<option value="">请选择</option>
					@foreach($column_list as $k=>$v)
					<option value="{{$v->id}}">{{$v->lefthtml}}{{$v->title}}</option> 
					@endforeach
				</select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">所属标签</label>
			<div class="layui-input-block">
				@foreach($label_list as $k1=>$v1)
					<input type="checkbox" name="blog_label_id[]" value="{{$v1['id']}}" lay-skin="primary" title="{{$v1['name']}}"> 
				@endforeach
			</div>
		</div>
		<div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-2">
                <input type="text" name="title" placeholder="请输入标题" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item layui-form-text">
            <label class="layui-form-label">SEO关键字</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入SEO关键字" lay-verify="required" name="keywords" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">SEO描述</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入SEO描述" lay-verify="required" name="description" class="layui-textarea"></textarea>
            </div>
        </div>
		@include('admin::layouts.create_html_image',['name'=>'图片','adPic'=>'adPic','image_id'=>'image_id','adBtn'=>'adBtn'])
		
		  
		@include('admin::layouts.create_ue',['name'=>'文章内容','id'=>'content'])
		<div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-2">
                <input type="text" onkeyup="this.value=this.value.replace(/\D/gi,&quot;&quot;)" maxlength="11" name="sort" value="1" placeholder="请输入排序编号" lay-verify="required" class="layui-input">
            </div>
        </div>
		@include('admin::layouts.submit',['url'=>route('blog_admin.article.index')])
	</form>
</div>
@include('admin::layouts.footer')
@include('admin::layouts.create_ajax',['url'=>route('blog_admin.article.store')])
@include('admin::layouts.create_ajax_image',['url'=>route('admin.upload.upload_file'),'adPic'=>'#adPic','image_id'=>'#image_id','adBtn'=>'#adBtn'])
 <script>
	layui.use(['form', 'layer'], function () {
        var form = layui.form,layer = layui.layer,$= layui.jquery;
		form.verify({	
			image_id: function(value){  
				if(value == ''){  
					return '请上传图片！';  
				}  
			}	
		});
    })
 </script>
 